#ifndef CONVERSION_HPP_
# define CONVERSION_HPP_

# include <list>
# include <vector>

class Conversion
{
public:
	template <typename T>
	static std::vector<T>*	stdListToStdVector(std::list<T> const& list)
	{
		if (list.size() == 0)
			return NULL;

		std::vector<T>*		converted = new std::vector<T>();
		int					c = 0;

        typename std::list<T>::const_iterator	itBegin = list.begin();
        typename std::list<T>::const_iterator	itEnd = list.end();

		converted->resize(list.size());

		while (itBegin != itEnd)
		{
			(*converted)[c] = *itBegin;
			++itBegin;
			c++;
		}
		return converted;
	}
};

#endif // !CONVERSION_HPP_
